#!/usr/bin/env python

from time import time

HOUR_IN_SECONDS = 60 * 60
DAY_IN_SECONDS = 24 * HOUR_IN_SECONDS
WEEK_IN_SECONDS = 7 * DAY_IN_SECONDS
MONTH_IN_SECONDS = DAY_IN_SECONDS * 30.4368499
YEAR_IN_SECONDS = 31556926

NOW = int(time())
YESTERDAY = NOW-DAY_IN_SECONDS
LAST_WEEK = NOW-WEEK_IN_SECONDS
LAST_MONTH = NOW-MONTH_IN_SECONDS
LAST_YEAR = NOW-YEAR_IN_SECONDS

def timestamp_range(begin, end=NOW, step=1):
	return xrange(begin, end, step)
	